From 7a4c860accb0e97e1efef0b9fe089a39f1c46a26 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 26 Nov 2004 10:49:46 +0000 Subject: [PATCH] Tell regexp engine to do extra analysis on doBlockLevels() paragraph-level HTML checking. This speeds up this part of the operation from about 30ms to about 7ms in Zuiderzee_Works on my test rig. --- includes/Parser.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index e17ad5a03c..a087f2a8a8 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1572,13 +1572,14 @@ class Parser $lastPrefix = $pref2; } if( 0 == $prefixLength ) { + wfProfileIn( "$fname-paragraph" ); # No prefix (not in list)--go to paragraph mode $uniq_prefix = UNIQ_PREFIX; // XXX: use a stack for nestable elements like span, table and div - $openmatch = preg_match('/(closeParagraph(); @@ -1627,6 +1628,7 @@ class Parser } } } + wfProfileOut( "$fname-paragraph" ); } if ($paragraphStack === false) { $output .= $t."\n"; -- 2.20.1